<?php
session_start();
//**********Error Handling Code*******//
define (FATAL,E_USER_ERROR);
define (ERROR,E_USER_WARNING);
define (WARNING,E_USER_NOTICE);

#### set the error reporting level for this script
//error_reporting (FATAL | ERROR | WARNING);
//$old_error_handler = set_error_handler("myErrorHandler1");
//**********End of Error Handling Code*******//
error_reporting(E_ALL ^E_NOTICE ^E_DEPRECATED);
ini_set("display_errors", 1);
ini_set('date.timezone', 'America/Los_Angeles');

#populating HTTP_POST_VARS and HTTP_GET_VARS

if (!empty($HTTP_POST_VARS)) {
	reset($HTTP_POST_VARS);
	while (list($k,$v)=each($HTTP_POST_VARS)) {
		${$k}=$v;
	}	
}
if (!empty($HTTP_GET_VARS)) {
	reset($HTTP_GET_VARS);
	while (list($k,$v)=each($HTTP_GET_VARS)) {
		${$k}=$v;
	}	
}

if (!empty($HTTP_POST_FILES)) 
{
	reset($HTTP_POST_FILES);
	while (list($k,$v) = each($HTTP_POST_FILES)) 
	{

		${$k} = $v['tmp_name'];
		${$k."_name"} = $v['name'];
		${$k."_type"} = $v['type'];
		${$k."_size"} = $v['size'];
	}
}


if (!empty($HTTP_SESSION_VARS)) {
	reset($HTTP_SESSION_VARS);
	while (list($k,$v)=each($HTTP_SESSION_VARS)) {
		//echo "k is $k -- v is $v <br>";
		${$k}=$v;
	}	
}

if (!empty($HTTP_SERVER_VARS)) {
	reset($HTTP_SERVER_VARS);
	while (list($k,$v)=each($HTTP_SERVER_VARS)) {
		${$k}=$v;
	}	
}



######/////////////////////////////////////////////////////////////######


define('_HOST_','localhost');
define('_USER_','root');
define('_DBNAME_','dialshaadi');
define('_PASS_','');
$imageUrl="images/"; // images URL

define('_INNER_PATH','dialshaadi/');
define('_SITE_URL','http://'.$_SERVER['HTTP_HOST'].'/'._INNER_PATH);
define('_SHAADI_IMAGE_URL', _SITE_URL.'shaadi-images/');
define('_IMAGE_URL',_SITE_URL.'images/');
define('_CSS_URL',_SITE_URL.'css/');
define('_JS_URL',_SITE_URL.'js/');


define('_DOC_ROOT',$_SERVER['DOCUMENT_ROOT'].'/'._INNER_PATH);
define('_SHAADI_IMAGE_PATH', _DOC_ROOT.'shaadi-images/');
define('_SITE_TPL_PATH_',_DOC_ROOT.'template/');


$AdminEmail="admin@dialshaadi.com";  // admin email
$NewsletterEmail="contact@dialshaadi.com"; // default email for newsletter
define('_EMAIL', 'mail@dialshaadi.com');
$brd_url['Home'] = _SITE_URL;
###### variables to store table names ends ###########################################
// Session variable front
define('_USER_ID','_user_id');
define('_USER_NAME','_user_name');

#################Different Status used in the site#################################################################
$query_form_active=1; //deactive status
$temp_page_active = 1;
//$_SESSION['tempoff'] = false;
if(isset($_REQUEST['tempoff']) || $_SESSION['tempoff']){
	$_SESSION['tempoff'] = true;
	$temp_page_active = 0;
	if(isset($_REQUEST['tempoff'])){
		header("location: ". _SITE_URL);
		exit;
	}
}

### database connection
require_once _DOC_ROOT.'lib/adodb/adodb.inc.php';
require_once _DOC_ROOT.'lib/MyDB/MyDB.php';
$DB = new MyDB();
$db = $DB->connect();

#########################variable to identify user types####################################

?>